﻿/*
 * Copyright (c) Huawei Technologies Co., Ltd. 2024-2024. All rights reserved.
 * Description: 集合通信op_rpc_npu头文件
 * Author: baochangjin
 * Create: 2024-3-4
 */
#ifndef OP_RPC_NPU_H
#define OP_RPC_NPU_H

#include <vector>
#include <hccl/hccl.h>
#include <hccl/hccl_types.h>
#include "op_base_pub.h"
#include "hccl_comm_pub.h"
#include "hccl_comm_rpc.h"
#include "config.h"

enum EsOpType : s32 {
    LOOKUP,
    UPDATE,
    LOOKUP_UNIQUED,
    MAX
};

#ifdef __cplusplus
extern "C" {
#endif

HcclResult HcclRemoteLookup(s32 tag, s32 insertFlag, void *stream, RemoteLookupPubParams &lookupPubInfo);

HcclResult HcclCollRemoteLookupOrUpdatePairedOrUniqued(const HcomRemoteOperationParams &params, EsOpType opType);

#ifdef __cplusplus
}
#endif

HcclResult HcpuGetCommByGroup(const char *group, std::shared_ptr<hccl::HcclCommBase> &hcclComm);

#endif  // OP_RPC_NPU_H